<template name="messages">
  <div class="modal-header">
    <h5 class="modal-title font-weight-bold mr-auto">私信</h5>
    <!-- {{> messages_header_tooltip_button
      className="mr-3"
      placement="left"
      tooltipTitle="全部标为已读"
      iconName="playlist_add_check"
    }} -->
    <button type="button" class="btn btn-primary btn-sm btn-custom-sm mr-3 go-messages-search">
      新私信
    </button>
    {{> messages_header_close_button}}
  </div>
  <div class="modal-message-body" id="messages-ps">
    {{#if results.count}}
      <div class="modal-body d-block p-0">
        <div class="listview listview-message p-0">
          {{#each result in results}}
            {{> messages_list_item result=result}}
          {{/each}}
          {{#if loading}}
            {{> loader_ball_beat}}
          {{/if}}
        </div>
      </div>
    {{else}}
      {{> messages_blank}}
    {{/if}}
  </div>
</template>

<template name="messages_blank">
  <div class="d-block text-center pt-5">
    <embed class="mt-5 mb-3" src="/img/svg/chat.svg" width="150" type="image/svg+xml" />
    <h5 class="font-weight-bold mb-3">只能群聊怎么行，试试私信</h5>
    <button type="button" class="btn btn-primary btn-flex btn-custom go-messages-search">
      发私信
      <i class="material-icons ml-2">mail_outline</i>
    </button>
  </div>
</template>